package com.es.hr.shopscore;

import javax.servlet.http.HttpServletRequest;

import com.es.business.citys.CitysBiz;
import com.es.common.CommonBean;
import com.es.common.CommonBiz;
import com.es.hr.shop.ShopBiz;
import com.opensymphony.webwork.interceptor.ServletRequestAware;
import com.opensymphony.xwork.ActionSupport;

public class ShopScoreModifyInitAction extends ActionSupport
implements ServletRequestAware{
	 HttpServletRequest request;

	public void setServletRequest(HttpServletRequest paramHttpServletRequest) {
		// TODO Auto-generated method stub
		this.request = paramHttpServletRequest;
	}
	
	public String execute() throws Exception{
		String result = "";
		
		ShopScoreBiz shopScoreBiz = new ShopScoreBiz();
		
		String shop_score_id = request.getParameter("shop_score_id");
		ShopScoreBean shopScore = shopScoreBiz.getShopScoreById(shop_score_id);
		
		 this.request.setAttribute("shop_score_id", shop_score_id);
		 
		 this.request.setAttribute("shop_code", shopScore.getShopId());
		 this.request.setAttribute("shop_name", new ShopBiz().getShopById( shopScore.getShopId()).getShop_name());
		 
		 this.request.setAttribute("starttime", shopScore.getStartTime());
		 this.request.setAttribute("endtime", shopScore.getEndTime());
		 this.request.setAttribute("shop_totalScore", shopScore.getTotalScore());
		 this.request.setAttribute("qita_value", shopScore.getTufashijianValue());
		 this.request.setAttribute("tufaList", new CommonBiz().getCommonByType("tufashijian"));
		 this.request.setAttribute("tufashijian_code", shopScore.getTufashijianCode()==null?"":shopScore.getTufashijianCode());
		result = "success";
		return result;
	}
	 

}
